home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 December / 1984-12.d64 / letter attack_64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  104 lines

  1. 10 poke53280,2:poke 53281,1
  2. 20 hs=0:bt=9999:v=54296:s=54273:n=128:a=54272:b=1027:tab$=""
  3. 22 for i=atoa+24:pokei,0:next
  4. 25 poke 54277,100:poke 54278,100
  5. 30 print "[147]letter attack!"
  6. 50 fort=1to1000:next
  7. 100 print"[147]":sc=0:tm=0:poke 198,0
  8. 110 print ""tab$"choose difficulty"
  9. 120 print tab$"level (1[146] - 9[146])"
  10. 130 dl$="":get dl$:if dl$="" then 130
  11. 140 if dl$<"1" or dl$>"9" then 130
  12. 150 print tab$ dl$
  13. 160 dl=val(dl$):dl=10-dl:poke 198,0
  14. 170 print tab$"how many letters"
  15. 180 print tab$"would you like?"
  16. 190 print tab$"1[146]0 - 9[146]0"
  17. 200 nl$="":get nl$:if nl$="" then 200
  18. 210 if nl$<"1" or nl$>"9" then 200
  19. 220 print nl$
  20. 230 nl=val(nl$):nl=nl*10:lr=nl
  21. 270 print"[147]"
  22. 280 poke 55296,2:poke 1024,77:poke 55302,2:poke 1030,78
  23. 290 for i=1065 to 1945 step 40
  24. 300 poke i+a,2:poke i,101:poke i+a+4,2:poke i+4,103
  25. 310 next i
  26. 320 poke 56256,2:poke 1984,78:poke 56262,2:poke 1990,77
  27. 330 print "[144]difficulty"
  28. 340 print "level:"
  29. 350 print "";10-dl
  30. 360 print "letters"
  31. 370 print "remaining:"
  32. 380 print "";lr
  33. 390 print "score:"
  34. 400 print "high score:"
  35. 410 print "";hs
  36. 420 if bt<>9999 then poke bt+54269,4:poke bt-3,62
  37. 470 for i=55299 to 56259 step 40
  38. 480 poke i,6
  39. 490 next i
  40. 500 le=int(rnd(1)*26+1):lc=le+64
  41. 510 for j=1 to 26
  42. 520 poke b,j
  43. 530 fort=1to20:next
  44. 540 next j
  45. 550 for i=1 to le
  46. 560 poke b,i
  47. 570 next i
  48. 580 poke b,32:a$="":cn=0:pokev,15:poke 198,0
  49. 585 poke 54276,17
  50. 590 for i=1027 to 1988 step 40
  51. 600 poke s,220-cn
  52. 610 poke i,le
  53. 620 for j=1 to dl
  54. 630 if a$="" then get a$
  55. 640 next j
  56. 650 if a$="" then 680
  57. 660 if asc(a$)=lc then 820
  58. 670 a$=""
  59. 680 poke i,32
  60. 690 cn=cn+3
  61. 700 next i
  62. 710 poke 54276,16
  63. 720 fort=1to100:next
  64. 730 lr=lr-1
  65. 740 print "      "
  66. 750 print "";lr
  67. 760 if lr=0 then 1010
  68. 770 goto 500
  69. 820 poke i+a+3,5:poke i+3,31:poke s,20:poke v,15:poke 54276,129
  70. 830 for k=1 to 30
  71. 840 poke i,81
  72. 850 fort=1to20:next
  73. 860 poke i,87
  74. 870 fort=1to20:next
  75. 880 next k
  76. 890 poke i,32:poke 54276,128
  77. 900 if i<bt then bt=i
  78. 910 tm=tm+(i-1026)/40:sc=sc+1:lr=lr-1
  79. 920 print "      "
  80. 930 print "";lr
  81. 940 print "";sc
  82. 950 if lr=0 then 1010
  83. 960 goto 500
  84. 1010 fort=1to750:next
  85. 1020 print "[147]"tab$"score:";sc
  86. 1030 if sc>hs then hs=sc
  87. 1040 print tab$"high score:";hs
  88. 1050 print tab$"highest possible"
  89. 1060 print tab$"score:";nl
  90. 1070 er=(sc/nl)*100
  91. 1080 print tab$"efficiency"
  92. 1090 print tab$"rating:";er;"%"
  93. 1100 if sc=0 then at=0:goto 1120
  94. 1110 at=int(tm/sc)
  95. 1120 print tab$"average time:";at
  96. 1130 print tab$"(1[146] - good 22[146] -bad)"
  97. 1140 print tab$"would you like to"
  98. 1150 print tab$"play again? (y or n)"
  99. 1160 poke 198,0
  100. 1170 a$="":get a$:if a$="" then 1170
  101. 1180 if a$="y" then 100
  102. 1181 ifa$<>"n"then1170
  103. 1190 print"[147]":end
  104.